package com.qingke.java.qixi;

import java.util.Arrays;
import java.util.List;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

import com.qingke.java.bean.User;
import com.qingke.java.dao.QixiDao;

public class QixiApp {
	public static void main(String[] args) {
		SessionFactory sf=new Configuration().configure().buildSessionFactory();
		Session session=sf.openSession();
		
		QixiDao dao=new QixiDao(session);
		
//		List<Object[]> list=dao.demo1();
//		for (Object[] object : list) {
//			System.out.println(Arrays.toString(object));
//		}
		List<User> list=dao.demo2();
		System.out.println(list);
	}
	
}
